package com.hjrpc.babyyamall.authserver.feign;

import com.hjrpc.babyyamall.authserver.vo.UserLoginVo;
import com.hjrpc.common.dto.MemberRegisterTo;
import com.hjrpc.common.dto.SocialUser;
import com.hjrpc.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("babyyamall-member")
public interface MemberFeignService {

    @GetMapping("member/member/register")
    R register(@RequestBody MemberRegisterTo memberRegisterTo);

    @PostMapping("member/member/login")
    R login(@RequestBody UserLoginVo userLoginVo);

    @PostMapping("member/member/socialLogin")
    R login(@RequestBody SocialUser socialUser);

    @GetMapping("member/member/info/{id}")
    R info(@PathVariable("id") Long memberId);
}
